<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<script type="text/javascript" src="<s:url value="/js/contactPerson.js"/>"></script>

<s:hidden name="editContactPersonId" value="%{contactPerson.id}"/>
<s:hidden name="contactPerson.id" value="%{contactPerson.id}"/>

<s:select label="Role" name="contactPerson.role.id" id="role"
          list="roles"
          listKey="id"
          listValue="descripcion"
          value="contactPerson.role.id">
</s:select>

<s:textfield label="Degree" name="contactPerson.degree" value="%{contactPerson.degree}"/>
<s:textfield label="Email" name="contactPerson.email" value="%{contactPerson.email}"/>
<s:textfield label="Fax" name="contactPerson.fax" value="%{contactPerson.fax}"/>
<s:textfield label="Phone" name="contactPerson.phone" value="%{contactPerson.phone}"/>
<s:textfield label="Hours of operation" name="contactPerson.horarioAtencion" value="%{contactPerson.horarioAtencion}"/>

<tr>
    <td>
        <s:submit value="Save" name="saveContact" action="saveContact" theme="simple" onclick="validate();" />
    </td>
    <s:if test="%{contactPerson.id != null}">
        <td>
            <s:submit value="Delete" name="delete" action="deleteContactPerson" theme="simple"/>
        </td>
    </s:if>
</tr>